package com.gsy.exception;

import java.text.MessageFormat;

/**
 * api参数异常
 * @author hthuang
 * @date 2018年1月22日
 */
public class ApiParameterException extends RuntimeException {

	private static final long serialVersionUID = -4747805149880826772L;
	private Integer code;

	public ApiParameterException(Throwable cause) {
		super(cause);
	}

	/**
	 * 使用MessageFormat.format格式化
	 */
	public ApiParameterException(String pattern, Object... arguments) {
		this(MessageFormat.format(pattern, arguments));
	}

	public ApiParameterException(String message, Throwable cause) {
		super(message, cause);
	}

	public ApiParameterException(String message) {
		super(message);
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}
}
